{php} if(\think\Hook::get('adminEditor') && MODULE_NAME == 'admin'){{/php}
    <label class="textarea">
        <textarea name="{$name}" id="{$id}">{$value|default=''}</textarea>
        {:hook('adminEditor', array('id'=>$id,'value'=>$value))}
    </label>

{php}}elseif(\think\Hook::get('editor')){{/php}
    <label class="textarea">
        <textarea name="{$name}" id="{$id}">{$value|default=''}</textarea>
        {:hook('editor', array('id'=>$id,'value'=>$value))}
    </label>

{php}}else{{/php}
    {if condition="$is_load_script"}
        <script type="text/javascript" charset="utf-8" src="__LIBS__/ueditor/ueditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="__LIBS__/ueditor/ueditor.all.min.js"></script>
    {/if}
    <script type="text/plain" name="{$name}" id="{$id}" style="width:{$width|default='100%'};height:{$height|default='300px'};{$style|default=''}">{$value|default=''}</script>

    <script>
        var  ue_{$id};
        $(function () {
            var config = {{$menus},'topOffset':$('#nav_bar').height()+$('#sub_nav').height()+5};
            ue_{$id} = UE.getEditor('{$id}', config);
        })

    </script>
{php}}{/php}